﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<OGS.Web.Models.Admin.SaveContentModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    <%= OGS.Utility.Helper.GetPageTitle("Save Content") %>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <%-- Main content--%>
    <section class="content">
        <div class="row">
            <div class="col-md-12">
                <ol class="breadcrumb">
                    <li><a href="/admin/manage-dashboard">Home</a></li>
                    <li><a href="/admin/content-list">Content List</a></li>
                    <li class="active">Save Content</li>
                </ol>
            </div>
            <div class="col-md-12">
                <% using (Html.BeginForm())
                   { %>
                <%: Html.AntiForgeryToken() %>
                <%: Html.HiddenFor(m => m.ID) %>
                <div class="well well-White">
                    <div class="bs-example form-horizontal">
                        <fieldset>
                            <legend>Save Content</legend>
                            <% if (Model.IsSuccess)
                               { %>
                            <div class="alert alert-success">
                                <a href="#" class="close" data-dismiss="alert">&times;</a>
                                <strong>Success!</strong> Content saved successfully. <a href="/admin/save-Content">Click here </a>to add new.
                            </div>
                            <% } %>
                            <div class="form-group">
                                <%: Html.LabelFor(m => m.Name, new { @class="col-lg-2 control-label" })%>
                                <div class="col-lg-10">
                                    <%: Html.TextBoxFor(m => m.Name, new { @class = "form-control", @maxlength = "100" })%>
                                    <%: Html.ValidationMessageFor(m => m.Name) %>
                                </div>
                            </div>
                            <div class="form-group">
                                <%: Html.LabelFor(m => m.IsActive, new { @class = "col-lg-2 control-label" })%>
                                <div class="col-lg-10">
                                    <%: Html.CheckBoxFor(m => m.IsActive) %>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-lg-12">
                                    <%: Html.TextAreaFor(m=> m.Description) %>
                                </div>
                            </div>

                            <div class="form-group">
                                <div class="col-lg-10 col-lg-offset-2">
                                    <input type="submit" class="btn btn-primary" value="Save" />
                                    <a href="/admin/Content-list" class="btn btn-default">Cancel</a>
                                </div>
                            </div>
                        </fieldset>
                    </div>
                </div>
                <% } %>
            </div>
        </div>
    </section>
    <%--/.content --%>
    <!-- CK Editor -->
    <script type="text/javascript" src="/js/plugins/ckeditor/ckeditor.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            //enable validation
            enableValidation();

            //CK EDITOR
            CKEDITOR.replace("Description");

            setTimeout(function () {
                $("#cke_1_contents").height(360);
            }, 500);
            setTimeout(function () {
                $("#cke_1_contents").height(360);
            }, 1000);

        });


    </script>

</asp:Content>
